#!/usr/bin/python

import sys

def iter_genes(source):
    gene_lines = []
    for line in source:
        if line.startswith('>'):
            if gene_lines:
                yield gene_lines[0], ''.join(gene_lines[1:])
                gene_lines = []
        gene_lines.append(line.strip())
    if gene_lines:
        yield gene_lines[0][1:], ''.join(gene_lines[1:])


def main():
    for gene_id, seq in iter_genes(sys.stdin):
        print '%s\t%s' % (gene_id, seq)


main()

